var photoArray = new Array(
		// Source, Width, Height, Caption
   {section name=id loop=$images}
      {if $smarty.section.id.last}
         new Array("{$images[id].src}", "{$images[id].width}", "{$images[id].height}", "{$images[id].descr}")
	  {else}    
	     new Array("{$images[id].src}", "{$images[id].width}", "{$images[id].height}", "{$images[id].descr}"),
	  {/if}
   {/section}
);